home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / MIDI Manager Class Library / CMIDIOutputPort.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-05  |  1.2 KB  |  47 lines  |  [TEXT/KAHL]

  1. /*
  2.  *--- CMIDIOutputPort.h -------------------------------------------------------
  3.  * Copyright © Paul Ferguson, 1990, 1991, 1992.  All rights reserved.
  4.  *
  5.  *    For use with THINK C 5.0 and the THINK Class Library.
  6.  *
  7.  * Description:
  8.  *    This class defines a MIDI Manager output port object.
  9.  *
  10.  *    Refer to the CMIDI Programmer's Manual for a complete desciption of
  11.  *    this class.
  12.  *----------------------------------------------------------------------------
  13.  */
  14. #pragma once
  15. #include "CMIDIDataPort.h"
  16. #include "CMIDITimePort.h"
  17.  
  18.  
  19. class CMIDIOutputPort : public CMIDIDataPort
  20. {
  21.  
  22. public:
  23.  
  24.     OSErr            IMIDIOutputPort(
  25.                         StringPtr        theName,         // Pascal format, 31 char max
  26.                         OSType            thePortID,
  27.                         Boolean            theVisibleFlag,
  28.                         CMIDITimePort *    theTimePort,
  29.                         long            theOffset);
  30.     virtual    OSErr    WritePacket(MIDIPacketPtr theMIDIPacket);
  31.     virtual    OSErr    Write(char * theData, short theDataLen);
  32.     virtual    OSErr    WriteTS(
  33.                         char *            theData,
  34.                         short            theDataLen,
  35.                         long            theTimeStamp);
  36.  
  37. private:
  38.  
  39.     OSErr            DoMIDIWrite(
  40.                         char *            theData,
  41.                         short            theDataLen,
  42.                         unsigned char    theFlags,
  43.                         long            theTimeStamp);
  44.     static pascal OSErr    (*midiWriteProc) (short refnum, MIDIPacketPtr packet);
  45. };
  46.  
  47. // end of CMIDIOutputPort.h